package com.wen.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wen.common.utils.PageUtils;
import com.wen.gulimall.product.entity.CategoryEntity;
import com.wen.gulimall.product.vo.Catelog2Vo;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author Wenjl
 * @email 2021212321@qq.com
 * @date 2022-07-20 14:22:34
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 查询所有商品分类信息以及子分类
     *
     * @return
     */
    List<CategoryEntity> listWithTree();

    void removeMenuByIds(Long[] catIds);

    Long[] findCatelogPath(Long catlogId);

    void updateCascade(CategoryEntity category);

    /**
     * 查询所有的一级分类
     *
     * @return
     */
    List<CategoryEntity> getLavel1Categorys();

    /**
     * 查出所有分类
     */

    Map<String, List<Catelog2Vo>> getCatalogJson() throws InterruptedException;
}

